<template>
  <div>
      <img src="../../assets/Images/area.png" width="100%" alt="">
    <van-collapse v-model="activeName" accordion border>
      <van-collapse-item title="高风险地区名单" name="1">
          <ul v-for="(item,i) in High" :key="i">
              <li>{{item}}</li>
          </ul>
      </van-collapse-item>
      <van-collapse-item title="低风险地区名单" name="2">
          <ul v-for="(item,i) in Mid" :key="i">
              <li>{{item}}</li>
          </ul>
      </van-collapse-item>
    </van-collapse>
  </div>
</template>

<script>
import api from "../../API/index";
export default {
  data() {
    return {
      High: [],
      Mid: [],
      activeName:0
    };
  },
  created() {
    api.getCovInfo().then((res) => {
      let riskarea = res.data.newslist[0].riskarea;
      this.High = riskarea.high;
      this.Mid = riskarea.mid;
    });
  },
};
</script>

<style scoped>
h2{
    padding:0.3rem;
}
</style>